package com.mpj.yolov12

import android.Manifest
import android.app.Activity
import android.content.Context
import android.os.Build
import androidx.core.app.ActivityCompat

class PermissionHelper {
    companion object {
        fun requestPermission(context: Activity) {
            ActivityCompat.requestPermissions(
                context,
                arrayOf(
                    android.Manifest.permission.INTERNET,
                    android.Manifest.permission.ACCESS_NETWORK_STATE,
                    android.Manifest.permission.ACCESS_WIFI_STATE,
                    android.Manifest.permission.ACCESS_FINE_LOCATION,
                    android.Manifest.permission.ACCESS_COARSE_LOCATION,
                ),
                0
            )
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
                ActivityCompat.requestPermissions(
                    context,
                    arrayOf(
                        Manifest.permission.NEARBY_WIFI_DEVICES,
                    ),
                    0
                )
            }
        }
    }
}